package com.example.zuoye.adapter.divider;

import android.content.Context;

import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;

public class DividerAdapter extends Y_DividerItemDecoration {
    public DividerAdapter(Context context) {
        super(context);
    }

    @Override
    public Y_Divider getDivider(int itemPosition) {
        switch (itemPosition%2){
            case 0:
                return new Y_DividerBuilder().setBottomSideLine(true,000000,5,0,0)
                        .setLeftSideLine(true,000000,5,0,0)
                        .setRightSideLine(true,000000,5,0,0)
                        .setTopSideLine(true,000000,5,0,0)
                        .create();

            case 1:
                return new Y_DividerBuilder().setBottomSideLine(true,000000,5,0,0)
                        .setLeftSideLine(true,000000,5,0,0)
                        .setRightSideLine(true,000000,5,0,0)
                        .setTopSideLine(true,000000,5,0,0)
                        .create();
            default:
                return new Y_DividerBuilder().create();
        }

    }
}
